package cc.cix.gt.org.dto.query;

import cc.cix.gt.common.annotation.IsMobile;
import cc.cix.gt.common.entity.QueryRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author cix
 */
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "QueryUserDTO对象", description = "用户查询")
public class QueryUserReq extends QueryRequest {

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("部门 ID")
    private Long deptId;

    @Email(message = "邮箱格式非法")
    @ApiModelProperty("邮箱")
    private String email;

    @IsMobile(message = "手机号格式非法")
    @ApiModelProperty("联系电话")
    private String mobile;

    @ApiModelProperty("状态：0=锁定，1=有效")
    private String status;

    @ApiModelProperty("性别：0=男，1=女，2=保密")
    private String sex;

    @Size(max = 100, message = "长度非法")
    @ApiModelProperty("描述")
    private String description;

    @NotBlank(message = "不能为空")
    @ApiModelProperty("角色 ID")
    private String roleId;

}
